import request from '@/utils/request'
import { getToken } from '@/utils/auth'
var token = getToken()
//列表
export function getPermissionList(id,pageData) {
    return request({
        url: '/permission/page/' + id+'/'+pageData.pageNo+'/'+pageData.pageSize,
        method: 'post',
    })
}
//选项权限等级列表
export function getPermissionDeptList(deptId) {
    return request({
        url: '/permission/list/' + deptId,
        method: 'get',
    })
}
//新增
export function getPermissionAdd(data) {
    return request({
        url: '/permission/add',
        method: 'post',
        data
    })
}

// 修改
export function getPermissionUpdate(data) {
    return request({
        url: '/permission/update',
        method: 'post',
        data
    })
}


// 查看
export function getPermissionDetail(id) {
    return request({
        url: '/permission/detail/' + id,
        method: 'get',
    })
}

// 删除
export function getPermissionDelete(id) {
    return request({
        url: '/permission/delete/' + id,
        method: 'get',
    })
}